import {
  get,
  post
} from '../utils/http'
import env from '../config/env'


export function listByUserId() {
  return get(`${env.API_URL}/ai/aiSession/listByUserId`)
}

export function del(id) {
  return post(`${env.API_URL}/ai/aiSession/delete`, {
    id
  })
}

export function add(title) {
  return post(`${env.API_URL}/ai/aiSession/add`, {
    title
  })
}

export function pageHistory(param) {
  return get(`${env.API_URL}/ai/aiSessionHistory/pageBySessionId`, param)
}